

<div class="doc-container" id="doc-container">
    <div class="container-fixed" style="right: 30px;">
        <div class="container-inner">
            <section class="msg-remark">
                <h2>评论</h2>
                <p>
                    沟通交流，拉近你我！
                </p>
            </section>
            <div class="textarea-wrap message" id="textarea-wrap">
                <form class="layui-form blog-editor comment-msg"  action="{:cmf_plugin_url('Comment://Comment/add');}" method="post">
                    <input type="hidden" name="object_title" value="{$object_title}">
                    <input type="hidden" name="table_name" value="{$table_name}">
                    <input type="hidden" name="object_id" value="{$object_id}">
                    <input type="hidden" name="url" value="{$url}">
                    <input type="hidden" name="to_user_id" value="0">
                    <input type="hidden" name="parent_id" value="0">
                    <div class="layui-form-item">
                        <textarea name="content" lay-verify="content" id="remarkEditor" placeholder="请输入内容，最少10个字～"
                                  class="layui-textarea layui-hide"></textarea>
                    </div>
                    <if condition='$captcha eq 1'>
                        <div class="layui-form-item captcha-container" style="display: inline-block;">
                            <input type="text" name="verify" class="captcha-input" placeholder="请输入验证码" required />
                            <captcha class="captcha-image" height="30" width="120" font-size="16" />
                        </div>
                    </if>
                    <div class="layui-form-item">
                        <button class="layui-btn" lay-submit="formLeaveMessage" lay-filter="formLeaveMessage" type="submit">
                            提交评论
                        </button>
                    </div>
                </form>
            </div>
        </div>
        <div class="f-cb"></div>
        <div class="mt20">
            <ul class="message-list" id="message-list">
                <foreach name="datas" item="vo">
                <li class="zoomIn article">
                    <div class="comment-parent">
                        <a name="remark-1"></a>
                        <img src="{:cmf_url('user/public/avatar',array('id'=>$vo['user_id']));}"/>
                        <div class="info">
                            <span class="username">{$vo.full_name|default='匿名用户'}</span>
                            <if condition='$vo.parent_id gt 0'>
                                <span style="padding-right:0;margin-left:-3px;">回复：</span>
                                <span class="username">{$vo.parent.full_name|default='匿名用户'}</span>
                            </if>
                        </div>
                        <div class="comment-content">
                            {$vo.content}
                        </div>
                        <p class="info info-footer">
                            <if condition='$vo.parent_id gt 0'>
                            <i class="fa fa-reply" aria-hidden="true"></i>
                            </if>
<!--                            <span>四川</span>-->
                            <span class="comment-time">{$vo.create_time|date='Y-m-d H:i:s'}</span>
                            <a href="javascript:;" class="btn-reply"
                               data-targetid="{$vo.user_id}"
                               data-parentid="{$vo.user_id}"
                               data-touserid="{$vo.id}"
                               data-targetname="{$vo.full_name|default='匿名用户'}"
                            >回复</a>
                        </p>
                    </div>
                    <hr/>
                    <if condition='$vo.parent_id gt 0'>
                        <div class="comment-child">
                            <a name="reply-1"></a>
                            <img src="{:cmf_url('user/public/avatar',array('id'=>$vo['parent']['user_id']));}">
                            <div class="info">
                                <span class="username">{$vo.parent.full_name|default='匿名用户'}</span>
                                <span style="padding-right:0;margin-left:-5px;">原内容：</span>
                                <span>{$vo.parent.content|strip_tags=###}</span>
                            </div>
                            <p class="info">
                                <!--<i class="fa fa-map-marker" aria-hidden="true"></i>
                                <span>四川</span>-->
                                <span class="comment-time">{$vo.parent.create_time|date='Y-m-d H:i:s'}</span>
                                <a href="javascript:;" class="btn-reply"
                                   data-parentid="{$vo.parent.id}"
                                   data-touserid="{$vo.parent.user_id}"
                                   data-targetid="{$vo.parent.user_id}"
                                   data-targetname="{$vo.parent.full_name|default='匿名用户'}"
                                >回复</a>
                            </p>
                        </div>
                    </if>
                    <div class="replycontainer layui-hide">
                        <form class="layui-form" action="{:cmf_plugin_url('Comment://Comment/add');}" method="post">
                            <input type="hidden" name="object_title" value="{$object_title}">
                            <input type="hidden" name="table_name" value="{$table_name}">
                            <input type="hidden" name="object_id" value="{$object_id}">
                            <input type="hidden" name="url" value="{$url}">
                            <input type="hidden" class="touserid" name="to_user_id" value="0">
                            <input type="hidden" class="parentid" name="parent_id" value="0">

                            <input type="hidden" name="remarkId" value="1">
                            <input type="hidden" name="targetUserId" value="0">
                            <div class="layui-form-item">
                                <textarea name="content" lay-verify="replyContent" placeholder="请输入内容，最少10个字～"
                                          class="layui-textarea" style="min-height:80px;"></textarea>
                            </div>
                            <if condition='$captcha eq 1'>
                                <div class="layui-form-item captcha-container" style="display: inline-block;">
                                    <input type="text" name="verify" class="captcha-input" placeholder="请输入验证码" required />
                                    <captcha class="captcha-image" height="30" width="120" font-size="16" style="width: 120px;height: 30px;" />
                                </div>
                            </if>
                            <div class="layui-form-item">
                                <button class="layui-btn layui-btn-xs" lay-submit="formReply" lay-filter="formReply">
                                    提交
                                </button>
                            </div>
                        </form>
                    </div>
                </li>
                </foreach>
            </ul>
        </div>
    </div>
</div>
<script>

</script>